/**
 * 
 */
package co.fitstart.entity.user;


import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.DynamicUpdate;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

/**
 * @author LZJ
 *
 */
@Entity
@Table(name = "user_month_count")
@DynamicUpdate
@JsonIgnoreProperties(value={"hibernate_lazy_initializer","handler","fieldHandler"})
public class UserMonthCount {
    
    @Id
    @GeneratedValue
    private Long id;   
    
    private Long studentId;
    
    private Integer cancelTimes;
    
    private Integer expireTimes;
    
    private String everyMonth;
    
    
    /**
     * The default constructor
     */
    public UserMonthCount() {
        
    }
    
    public UserMonthCount saveThisMonthFirstData(Long studentId,int cancelTimes,String everyMonth) {
    	
    	this.studentId = studentId;
    	this.cancelTimes = cancelTimes;
    	this.everyMonth = everyMonth;
    	
    	return this;
    }
    
    public UserMonthCount addThisMonthCancelTime(int cancelTimes) {
    	this.cancelTimes = cancelTimes;
    	
    	return this;
    }
    
    //减去一次逾期记录
    public UserMonthCount minusExpireTimes(int expireTimes) {
    	
    	this.expireTimes = expireTimes;
    	
    	return this;
    	
    }
    
    
	/**
	 * @return the id
	 */
	public Long getId() {
		return id;
	}


	/**
	 * @param id the id to set
	 */
	public void setId(Long id) {
		this.id = id;
	}


	/**
	 * @return the studentId
	 */
	public Long getStudentId() {
		return studentId;
	}


	/**
	 * @param studentId the studentId to set
	 */
	public void setStudentId(Long studentId) {
		this.studentId = studentId;
	}


	/**
	 * @return the cancelTimes
	 */
	public Integer getCancelTimes() {
		return cancelTimes;
	}

	/**
	 * @param cancelTimes the cancelTimes to set
	 */
	public void setCancelTimes(Integer cancelTimes) {
		this.cancelTimes = cancelTimes;
	}

	/**
	 * @return the expireTimes
	 */
	public Integer getExpireTimes() {
		return expireTimes;
	}

	/**
	 * @param expireTimes the expireTimes to set
	 */
	public void setExpireTimes(Integer expireTimes) {
		this.expireTimes = expireTimes;
	}

	/**
	 * @return the everyMonth
	 */
	public String getEveryMonth() {
		return everyMonth;
	}

	/**
	 * @param everyMonth the everyMonth to set
	 */
	public void setEveryMonth(String everyMonth) {
		this.everyMonth = everyMonth;
	}


}
